/*
	This file is part of "Ants on the web".

    "Ants on the web" is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "Ants on the web" is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with "Ants on the web".  If not, see <http://www.gnu.org/licenses/>.
*/

package org.utc.ia04.antsontheweb.main;

import jade.core.Profile;
import jade.core.ProfileImpl;
import jade.wrapper.AgentController;

public class TeachingClient
{
	public static void main(String[] args)
	{
		try
		{
			//A) CONFIGURATION DU SYSTEM
			DefaultClient.LOCAL_FOLDER = System.getProperty("user.dir") + "/externalData/";
			
			//* ---------------- b) Run at UTC
			System.getProperties().put("http.proxyHost","proxyweb.utc.fr");
			System.getProperties().put("http.proxyPort","3128");
			// -------------------------------*/
			
			//B) CREATION DU CONTENEUR PRINCIPALE
			jade.core.Runtime rt = jade.core.Runtime.instance();
			Profile p = new ProfileImpl(DefaultClient.LOCAL_FOLDER + "shortmain.properties");
			
			//FIX LINUX
			//p.setParameter(ProfileImpl.LOCAL_HOST, "127.0.0.1");
			
			jade.wrapper.AgentContainer mc = rt.createMainContainer(p);
			
			//C) CREATION DES AGENTS
			AgentController kbGui = mc.createNewAgent("KB_Gui", "org.utc.ia04.antsontheweb.gui.knowledgeBase.KnowledgeBaseLearningGuiAgent", null);
			kbGui.start();
			AgentController kb = mc.createNewAgent("KB_Agent", "org.utc.ia04.antsontheweb.knowledgeBase.KnowledgeBaseAgent", null);
			kb.start();
		}
		catch(Exception e)
		{
			System.out.println("Error during agents creation or tests : " + e.toString());
		}
	}
}
